package com.example.databindingdemo.viewmodel;

import com.example.databindingdemo.bean.Book;
import com.example.databindingdemo.utils.Constants;

import java.util.ArrayList;
import java.util.List;

/**
 * @author: njb
 * @date: 2022/9/18 17:12
 * @desc:
 */
public class RecyclerViewViewModel {
    public List<Book> getBooks(){
        List<Book> books = new ArrayList<>();
        for(int i=0;i<100;i++){
            Book book = new Book(Constants.title,Constants.content);
            book.img = Constants.imgUrl;
            books.add(book);
        }
        return  books;
    }
}
